/**
 * 
 */
package com.nars.hashmap;
/**
 * @author Student
 *
 */
public class Dictionary<E> {
	
	Object[] dictionary;
	private int capacity;
	
	public Dictionary(int capacityTemp) {
		this.capacity = capacityTemp;
		dictionary = new Object[capacity];
	}
	
	public int hashFunction(String key) {
		// this will return int in range [0 : cap -1]
		return (key.hashCode())%(capacity);
	}
	
	public void put(Entry<E> entry) {
		int index = hashFunction(entry.key);
		dictionary[index] = entry;		
	}
	
	public Object get(String key) {
		int index = hashFunction(key);
		return dictionary[index];
	}
	//get
	//put 
	//remove	
	
}
